package us.icitap.cm.business.ejb;

import java.util.List;

import javax.ejb.Local;

import us.icitap.cm.business.AppListTypeEnum;
import us.icitap.cm.business.entities.AppList;
import us.icitap.cm.business.entities.AssociationType;
import us.icitap.cm.business.entities.Case;
import us.icitap.cm.business.entities.PoliceCode;
import us.icitap.cm.business.entities.UniqueNumber;
import us.icitap.cm.business.entities.regmin.Cities;
import us.icitap.cm.business.entities.regmin.District;
import us.icitap.cm.business.entities.regmin.VehicleModel;
import us.icitap.utils.Result;

@Local
public interface IAppPersistenceBean {

	public abstract Result<UniqueNumber> findUniqueNumber(String un);

	public abstract <T> Result<List<T>> getList(Class<T> entityClass,
			boolean withStatus, String orderBy);

	public abstract <T> Result<T> saveEntity(T entity);

	Result<List<PoliceCode>> getRootPoliceCode();

	Result<List<Cities>> getCities(Object object);

	Result<List<District>> getDistrict(Object region);

	Result<List<VehicleModel>> getVehicleModel(Object brand);

	Result<List<AssociationType>> getAssociationType(String associationType);

	Result<Case> findCaseById(String caseId);


	<T> Result<T> findEntityById(Object id, Class<T> entity);




	Result<Case> saveReport(Case _case);

	Integer getLastAppEntityId(Case pCase);


	List<AppList> getAppList(AppListTypeEnum listType, boolean withStatus,
			boolean orderList);

	Result<AppList> findAppListByTag(String tag);

	Result<List<AppList>> getAppListChildren(AppList parent);


}